package ru.cod.rs.managers;

import ru.cod.rs.R;
import ru.cod.rs.objects.StateObject;
import ru.cod.rs.views.GameView;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

/**
 * Manager
 * 
 * @author Suslov Vadim
 * 
 */
public class GameManager extends DrawManager {

	public GameManager(Context c, GameView v) {
		super(c, v);
	}

	// //////////////////////////////////////

	@Override
	protected void update() {
	};

	@Override
	protected void render(Canvas c) {
		c.drawColor(Color.GRAY);
		drawText(c);
		Bitmap bm = getImage(R.drawable.example_building);
		StateObject building = new StateObject(200, view.getHeight()
				- bm.getHeight());
		building.setImage(bm);
		building.draw(c);

	}

	// /////////////////////////////////////////////

	private void drawText(Canvas c) {
		Paint p = new Paint();
		p.setColor(Color.GREEN);
		c.drawText(String.valueOf(view.getWidth()), view.getWidth() - 25, 15, p);
	}

}
